for (int j = 0; j < c_attributes.length; j++) {
a = c_attributes[j];
if (a instanceof LineNumberTable) {
LineNumber[] ln = ((LineNumberTable) a).getLineNumberTable();
for (int k = 0; k < ln.length; k++) {
LineNumber l = ln[k];
InstructionHandle ih = il.findHandle(l.getStartPC());
if (ih != null) {
addLineNumber(ih, l.getLineNumber());
}
}
} else if (a instanceof LocalVariableTable) {
LocalVariable[] lv = ((LocalVariableTable) a).getLocalVariableTable();
removeLocalVariables();
for (int k = 0; k < lv.length; k++) {
LocalVariable l = lv[k];
InstructionHandle start = il.findHandle(l.getStartPC());
InstructionHandle end = il.findHandle(l.getStartPC() + l.getLength());
// Repair malformed handles
if (null == start) {
start = il.getStart();
}
if (null == end) {
end = il.getEnd();
}
addLocalVariable(l.getName(), Type.getType(l.getSignature()), l
.getIndex(), start, end);
}
} else if (a instanceof LocalVariableTypeTable) {
LocalVariable[] lv = ((LocalVariableTypeTable) a).getLocalVariableTypeTable();
removeLocalVariables();
for (int k = 0; k < lv.length; k++) {
LocalVariable l = lv[k];
InstructionHandle start = il.findHandle(l.getStartPC());
InstructionHandle end = il.findHandle(l.getStartPC() + l.getLength());
// Repair malformed handles
if (null == start) {
start = il.getStart();
}
if (null == end) {
end = il.getEnd();
}
addLocalVariable(l.getName(), Type.getType(l.getSignature()), l
.getIndex(), start, end);
}
} else {
addCodeAttribute(a);
}